// Copyright (c) 2024，D-Robotics.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/***************************************************************************
 *                      COPYRIGHT NOTICE
 *             Copyright 2020 Horizon Robotics, Inc.
 *                     All rights reserved.
 ***************************************************************************/

/**
 * @file camera_mod_calib_data.h
 *
 * @NO{S10E02C04}
 * @ASIL{B}
 */

#ifndef __CAMERA_MOD_CALIB_DATA_H__
#define __CAMERA_MOD_CALIB_DATA_H__

#include <stdint.h>

#include "camera_mod_common.h"

#include "cam_config.h"

#ifdef __cplusplus
extern "C" {
#endif

// ------------------------------------------------------------------------ //
//		STATIC CALIBRATION VALUES
// ------------------------------------------------------------------------ //
#define CALIBRATION_LIGHT_SRC 				(0x00000000)
#define CALIBRATION_RG_POS 				(0x00000001)
#define CALIBRATION_BG_POS 				(0x00000002)
#define CALIBRATION_MESH_RGBG_WEIGHT 			(0x00000003)
#define CALIBRATION_MESH_LS_WEIGHT 			(0x00000004)
#define CALIBRATION_MESH_COLOR_TEMPERATURE 		(0x00000005)
#define CALIBRATION_WB_STRENGTH 			(0x00000006)
#define CALIBRATION_SKY_LUX_TH 				(0x00000007)
#define CALIBRATION_CT_RG_POS_CALC 			(0x00000008)
#define CALIBRATION_CT_BG_POS_CALC 			(0x00000009)
#define CALIBRATION_COLOR_TEMP 				(0x0000000A)
#define CALIBRATION_CT65POS 				(0x0000000B)
#define CALIBRATION_CT40POS 				(0x0000000C)
#define CALIBRATION_CT30POS 				(0x0000000D)
#define CALIBRATION_EVTOLUX_EV_LUT 			(0x0000000E)
#define CALIBRATION_EVTOLUX_LUX_LUT 			(0x0000000F)
#define CALIBRATION_BLACK_LEVEL_R 			(0x00000010)
#define CALIBRATION_BLACK_LEVEL_GR 			(0x00000011)
#define CALIBRATION_BLACK_LEVEL_GB 			(0x00000012)
#define CALIBRATION_BLACK_LEVEL_B 			(0x00000013)
#define CALIBRATION_STATIC_WB 				(0x00000014)
#define CALIBRATION_MT_ABSOLUTE_LS_A_CCM 		(0x00000015)
#define CALIBRATION_MT_ABSOLUTE_LS_D40_CCM 		(0x00000016)
#define CALIBRATION_MT_ABSOLUTE_LS_D50_CCM 		(0x00000017)
#define CALIBRATION_SHADING_LS_A_R 			(0x00000018)
#define CALIBRATION_SHADING_LS_A_G 			(0x00000019)
#define CALIBRATION_SHADING_LS_A_B 			(0x0000001A)
#define CALIBRATION_SHADING_LS_TL84_R 			(0x0000001B)
#define CALIBRATION_SHADING_LS_TL84_G 			(0x0000001C)
#define CALIBRATION_SHADING_LS_TL84_B 			(0x0000001D)
#define CALIBRATION_SHADING_LS_D65_R 			(0x0000001E)
#define CALIBRATION_SHADING_LS_D65_G 			(0x0000001F)
#define CALIBRATION_SHADING_LS_D65_B 			(0x00000020)
#define CALIBRATION_AWB_WARMING_LS_A 			(0x00000021)
#define CALIBRATION_AWB_WARMING_LS_D50 			(0x00000022)
#define CALIBRATION_AWB_WARMING_LS_D75 			(0x00000023)
#define CALIBRATION_NOISE_PROFILE 			(0x00000024)
#define CALIBRATION_DEMOSAIC 				(0x00000025)
#define CALIBRATION_GAMMA 				(0x00000026)
#define CALIBRATION_IRIDIX_ASYMMETRY 			(0x00000027)
#define CALIBRATION_AWB_SCENE_PRESETS 			(0x00000028)
#define CALIBRATION_WDR_NP_LUT 				(0x00000029)
#define CALIBRATION_CA_FILTER_MEM 			(0x0000002A)
#define CALIBRATION_CA_CORRECTION 			(0x0000002B)
#define CALIBRATION_CA_CORRECTION_MEM 			(0x0000002C)
#define CALIBRATION_SHADING_RADIAL_R 			(0x0000002D)
#define CALIBRATION_SHADING_RADIAL_G 			(0x0000002E)
#define CALIBRATION_SHADING_RADIAL_B 			(0x0000002F)
#define CALIBRATION_SHADING_RADIAL_IR 			(0x00000030)
#define CALIBRATION_SHADING_RADIAL_CENTRE_AND_MULT 	(0x00000031)
#define CALIBRATION_GAMMA_FE 				(0x00000032)
#define CALIBRATION_AWB_WARMING_CCT 			(0x00000033)
#define CALIBRATION_AWB_MIXED_LIGHT_PARAMETERS 		(0x00000034)

// ------------------------------------------------------------------------ //
//		DYNAMIC CALIBRATION VALUES
// ------------------------------------------------------------------------ //
#define CALIBRATION_STITCHING_LM_MED_NOISE_INTENSITY	(0x00000035)
#define CALIBRATION_EXPOSURE_RATIO_ADJUSTMENT		(0x00000036)
#define CALIBRATION_SINTER_STRENGTH_MC_CONTRAST		(0x00000037)
#define CALIBRATION_SINTER_PARAMS			(0x00000038)
#define CALIBRATION_SINTER_RADIAL_LUT			(0x00000039)
#define CALIBRATION_SINTER_RADIAL_PARAMS		(0x0000003A)
#define CALIBRATION_AWB_BG_MAX_GAIN			(0x0000003B)
#define CALIBRATION_IRIDIX8_STRENGTH_DK_ENH_CONTROL	(0x0000003C)
#define CALIBRATION_IRIDIX8_EXTENDED_CONTROL		(0x0000003D)
#define CALIBRATION_CMOS_CONTROL			(0x0000003E)
#define CALIBRATION_DP_SLOPE				(0x0000003F)
#define CALIBRATION_DP_THRESHOLD			(0x00000040)
#define CALIBRATION_STITCHING_LM_MOV_MULT		(0x00000041)
#define CALIBRATION_STITCHING_LM_NP			(0x00000042)
#define CALIBRATION_STITCHING_MS_MOV_MULT		(0x00000043)
#define CALIBRATION_STITCHING_MS_NP			(0x00000044)
#define CALIBRATION_STITCHING_SVS_MOV_MULT		(0x00000045)
#define CALIBRATION_STITCHING_SVS_NP			(0x00000046)
#define CALIBRATION_EVTOLUX_PROBABILITY_ENABLE		(0x00000047)
#define CALIBRATION_AWB_AVG_COEF			(0x00000048)
#define CALIBRATION_IRIDIX_AVG_COEF			(0x00000049)
#define CALIBRATION_IRIDIX_STRENGTH_MAXIMUM		(0x0000004A)
#define CALIBRATION_IRIDIX_MIN_MAX_STR			(0x0000004B)
#define CALIBRATION_IRIDIX_EV_LIM_FULL_STR		(0x0000004C)
#define CALIBRATION_IRIDIX_EV_LIM_NO_STR		(0x0000004D)
#define CALIBRATION_AE_CORRECTION			(0x0000004E)
#define CALIBRATION_AE_EXPOSURE_CORRECTION		(0x0000004F)
#define CALIBRATION_SINTER_STRENGTH			(0x00000050)
#define CALIBRATION_SINTER_STRENGTH1			(0x00000051)
#define CALIBRATION_SINTER_STRENGTH4			(0x00000052)
#define CALIBRATION_SINTER_THRESH1			(0x00000053)
#define CALIBRATION_SINTER_THRESH4			(0x00000054)
#define CALIBRATION_SHARP_ALT_D				(0x00000055)
#define CALIBRATION_SHARP_ALT_UD			(0x00000056)
#define CALIBRATION_SHARP_ALT_DU			(0x00000057)
#define CALIBRATION_DEMOSAIC_UU_SLOPE			(0x00000058)
#define CALIBRATION_MESH_SHADING_STRENGTH		(0x00000059)
#define CALIBRATION_SATURATION_STRENGTH			(0x0000005A)
#define CALIBRATION_CCM_ONE_GAIN_THRESHOLD		(0x0000005B)
#define CALIBRATION_AE_ZONE_WGHT_HOR			(0x0000005C)
#define CALIBRATION_AE_ZONE_WGHT_VER			(0x0000005D)
#define CALIBRATION_AWB_ZONE_WGHT_HOR			(0x0000005E)
#define CALIBRATION_AWB_ZONE_WGHT_VER			(0x0000005F)
#define CALIBRATION_FS_MC_OFF				(0x00000060)
#define CALIBRATION_CMOS_EXP_PARTITION			(0x00000061)
#define CALIBRATION_DEFECT_PIXEL			(0x00000062)
#define CALIBRATION_GAMMA_BE0				(0x00000063)
#define CALIBRATION_GAMMA_BE1				(0x00000064)
#define CALIBRATION_DECOMPANDER_CONTROL			(0x00000065)
#define CALIBRATION_INPUT_FORMATTER			(0x00000066)
#define CALIBRATION_NEQ_LUT				(0x00000067)
#define CALIBRATION_SINTER_INTCONFIG			(0x00000068)
#define CALIBRATION_RGB2RGB_HS_CONVERSION		(0x00000069)
#define CALIBRATION_RGB2RGB_HS_CONVERSION_B		(0x0000006A)
#define CALIBRATION_RGB2RGB_S2_CONVERSION		(0x0000006B)
#define CALIBRATION_RGB2RGB_S2_CONVERSION_B		(0x0000006C)
#define CALIBRATION_AE_CONTROL_HDR_TARGET		(0x0000006D)
#define CALIBRATION_AE_CONTROL				(0x0000006E)
#define CALIBRATION_COLOR_MATRIX_YUV_PRESETS		(0x0000006F)
#define CALIBRATION_COLOR_MATRIX_B_YUV_PRESETS		(0x00000070)
#define CALIBRATION_COLOR_MATRIX_LUV_PRESETS		(0x00000071)
#define CALIBRATION_COLOR_MATRIX_B_LUV_PRESETS		(0x00000072)
#define CALIBRATION_IRIDIX_GTM_LUT_X			(0x00000073)
#define CALIBRATION_IRIDIX_GTM_LUT_Y			(0x00000074)
#define CALIBRATION_DEMOSAIC_CONFIG			(0x00000075)
#define CALIBRATION_GAMMA_BLACK_LEVELS			(0x00000076)
#define CALIBRATION_RAW_FRONTEND_CONFIG			(0x00000077)
#define CALIBRATION_NOISE_PROFILE_CONFIG		(0x00000078)
#define CALIBRATION_WDR_STITCH_CONFIG			(0x00000079)
#define CALIBRATION_STATISTICS_CONFIG			(0x0000007A)
#define CALIBRATION_CUSTOM_SETTINGS			(0x0000007B)

#define CALIBRATION_IRIDIX_BRIGHT_PR			(0x0000007c)
#define CALIBRATION_IRIDIX_SVARIANCE			(0x0000007d)
#define CALIBRATION_VERSION_INFO			(0x0000007e)
#define CALIBRATION_SHADING_TEMPER_THRESHOLD		(0x0000007f)
#define CALIBRATION_CCM_TEMPER_THRESHOLD		(0x00000080)
#define CALIBRATION_GAMMA_EV1				(0x00000081)
#define CALIBRATION_GAMMA_EV2				(0x00000082)
#define CALIBRATION_GAMMA_THRESHOLD			(0x00000083)

#define CALIBRATION_IRIDIX_ASYMMETRY_EV1		(0x00000084)
#define CALIBRATION_IRIDIX_ASYMMETRY_EV2		(0x00000085)
#define CALIBRATION_IRIDIX_THRESHOLD			(0x00000086)

#define CALIBRATION_OUTPUT_YUV_Y_LUT			(0x00000087)
#define CALIBRATION_OUTPUT_YUV_UV_LUT			(0x00000088)
#define CALIBRATION_IRIDIX_WHITE_LEVEL			(0x00000089)
#define CALIBRATION_GRASS_REMOVE_PARAM			(0x0000008a)
#define CALIBRATION_NAME_MAX				(0x0000008b)


// ------------------------------------------------------------------
//              DYNAMIC STATE VALUES
// ------------------------------------------------------------------

#define CALIBRATION_NAMES { \
	"CALIBRATION_LIGHT_SRC",			/* 0x00000000 */ \
	"CALIBRATION_RG_POS",				/* 0x00000001 */ \
	"CALIBRATION_BG_POS",				/* 0x00000002 */ \
	"CALIBRATION_MESH_RGBG_WEIGHT",			/* 0x00000003 */ \
	"CALIBRATION_MESH_LS_WEIGHT",			/* 0x00000004 */ \
	"CALIBRATION_MESH_COLOR_TEMPERATURE",		/* 0x00000005 */ \
	"CALIBRATION_WB_STRENGTH",			/* 0x00000006 */ \
	"CALIBRATION_SKY_LUX_TH",			/* 0x00000007 */ \
	"CALIBRATION_CT_RG_POS_CALC",			/* 0x00000008 */ \
	"CALIBRATION_CT_BG_POS_CALC",			/* 0x00000009 */ \
	"CALIBRATION_COLOR_TEMP",			/* 0x0000000A */ \
	"CALIBRATION_CT65POS",				/* 0x0000000B */ \
	"CALIBRATION_CT40POS",				/* 0x0000000C */ \
	"CALIBRATION_CT30POS",				/* 0x0000000D */ \
	"CALIBRATION_EVTOLUX_EV_LUT",			/* 0x0000000E */ \
	"CALIBRATION_EVTOLUX_LUX_LUT",			/* 0x0000000F */ \
	"CALIBRATION_BLACK_LEVEL_R",			/* 0x00000010 */ \
	"CALIBRATION_BLACK_LEVEL_GR",			/* 0x00000011 */ \
	"CALIBRATION_BLACK_LEVEL_GB",			/* 0x00000012 */ \
	"CALIBRATION_BLACK_LEVEL_B",			/* 0x00000013 */ \
	"CALIBRATION_STATIC_WB",			/* 0x00000014 */ \
	"CALIBRATION_MT_ABSOLUTE_LS_A_CCM",		/* 0x00000015 */ \
	"CALIBRATION_MT_ABSOLUTE_LS_D40_CCM",		/* 0x00000016 */ \
	"CALIBRATION_MT_ABSOLUTE_LS_D50_CCM",		/* 0x00000017 */ \
	"CALIBRATION_SHADING_LS_A_R",			/* 0x00000018 */ \
	"CALIBRATION_SHADING_LS_A_G",			/* 0x00000019 */ \
	"CALIBRATION_SHADING_LS_A_B",			/* 0x0000001A */ \
	"CALIBRATION_SHADING_LS_TL84_R",		/* 0x0000001B */ \
	"CALIBRATION_SHADING_LS_TL84_G",		/* 0x0000001C */ \
	"CALIBRATION_SHADING_LS_TL84_B",		/* 0x0000001D */ \
	"CALIBRATION_SHADING_LS_D65_R",			/* 0x0000001E */ \
	"CALIBRATION_SHADING_LS_D65_G",			/* 0x0000001F */ \
	"CALIBRATION_SHADING_LS_D65_B",			/* 0x00000020 */ \
	"CALIBRATION_AWB_WARMING_LS_A",			/* 0x00000021 */ \
	"CALIBRATION_AWB_WARMING_LS_D50",		/* 0x00000022 */ \
	"CALIBRATION_AWB_WARMING_LS_D75",		/* 0x00000023 */ \
	"CALIBRATION_NOISE_PROFILE",			/* 0x00000024 */ \
	"CALIBRATION_DEMOSAIC",				/* 0x00000025 */ \
	"CALIBRATION_GAMMA",				/* 0x00000026 */ \
	"CALIBRATION_IRIDIX_ASYMMETRY",			/* 0x00000027 */ \
	"CALIBRATION_AWB_SCENE_PRESETS",		/* 0x00000028 */ \
	"CALIBRATION_WDR_NP_LUT",			/* 0x00000029 */ \
	"CALIBRATION_CA_FILTER_MEM",			/* 0x0000002A */ \
	"CALIBRATION_CA_CORRECTION",			/* 0x0000002B */ \
	"CALIBRATION_CA_CORRECTION_MEM",		/* 0x0000002C */ \
	"CALIBRATION_SHADING_RADIAL_R",			/* 0x0000002D */ \
	"CALIBRATION_SHADING_RADIAL_G",			/* 0x0000002E */ \
	"CALIBRATION_SHADING_RADIAL_B",			/* 0x0000002F */ \
	"CALIBRATION_SHADING_RADIAL_IR",		/* 0x00000030 */ \
	"CALIBRATION_SHADING_RADIAL_CENTRE_AND_MULT",	/* 0x00000031 */ \
	"CALIBRATION_GAMMA_FE",				/* 0x00000032 */ \
	"CALIBRATION_AWB_WARMING_CCT",			/* 0x00000033 */ \
	"CALIBRATION_AWB_MIXED_LIGHT_PARAMETERS",	/* 0x00000034 */ \
	"CALIBRATION_STITCHING_LM_MED_NOISE_INTENSITY",	/* 0x00000035 */ \
	"CALIBRATION_EXPOSURE_RATIO_ADJUSTMENT",	/* 0x00000036 */ \
	"CALIBRATION_SINTER_STRENGTH_MC_CONTRAST",	/* 0x00000037 */ \
	"CALIBRATION_SINTER_PARAMS",			/* 0x00000038 */ \
	"CALIBRATION_SINTER_RADIAL_LUT",		/* 0x00000039 */ \
	"CALIBRATION_SINTER_RADIAL_PARAMS",		/* 0x0000003A */ \
	"CALIBRATION_AWB_BG_MAX_GAIN",			/* 0x0000003B */ \
	"CALIBRATION_IRIDIX8_STRENGTH_DK_ENH_CONTROL",	/* 0x0000003C */ \
	"CALIBRATION_IRIDIX8_EXTENDED_CONTROL",		/* 0x0000003D */ \
	"CALIBRATION_CMOS_CONTROL",			/* 0x0000003E */ \
	"CALIBRATION_DP_SLOPE",				/* 0x0000003F */ \
	"CALIBRATION_DP_THRESHOLD",			/* 0x00000040 */ \
	"CALIBRATION_STITCHING_LM_MOV_MULT",		/* 0x00000041 */ \
	"CALIBRATION_STITCHING_LM_NP",			/* 0x00000042 */ \
	"CALIBRATION_STITCHING_MS_MOV_MULT",		/* 0x00000043 */ \
	"CALIBRATION_STITCHING_MS_NP",			/* 0x00000044 */ \
	"CALIBRATION_STITCHING_SVS_MOV_MULT",		/* 0x00000045 */ \
	"CALIBRATION_STITCHING_SVS_NP",			/* 0x00000046 */ \
	"CALIBRATION_EVTOLUX_PROBABILITY_ENABLE",	/* 0x00000047 */ \
	"CALIBRATION_AWB_AVG_COEF",			/* 0x00000048 */ \
	"CALIBRATION_IRIDIX_AVG_COEF",			/* 0x00000049 */ \
	"CALIBRATION_IRIDIX_STRENGTH_MAXIMUM",		/* 0x0000004A */ \
	"CALIBRATION_IRIDIX_MIN_MAX_STR",		/* 0x0000004B */ \
	"CALIBRATION_IRIDIX_EV_LIM_FULL_STR",		/* 0x0000004C */ \
	"CALIBRATION_IRIDIX_EV_LIM_NO_STR",		/* 0x0000004D */ \
	"CALIBRATION_AE_CORRECTION",			/* 0x0000004E */ \
	"CALIBRATION_AE_EXPOSURE_CORRECTION",		/* 0x0000004F */ \
	"CALIBRATION_SINTER_STRENGTH",			/* 0x00000050 */ \
	"CALIBRATION_SINTER_STRENGTH1",			/* 0x00000051 */ \
	"CALIBRATION_SINTER_STRENGTH4",			/* 0x00000052 */ \
	"CALIBRATION_SINTER_THRESH1",			/* 0x00000053 */ \
	"CALIBRATION_SINTER_THRESH4",			/* 0x00000054 */ \
	"CALIBRATION_SHARP_ALT_D",			/* 0x00000055 */ \
	"CALIBRATION_SHARP_ALT_UD",			/* 0x00000056 */ \
	"CALIBRATION_SHARP_ALT_DU",			/* 0x00000057 */ \
	"CALIBRATION_DEMOSAIC_UU_SLOPE",		/* 0x00000058 */ \
	"CALIBRATION_MESH_SHADING_STRENGTH",		/* 0x00000059 */ \
	"CALIBRATION_SATURATION_STRENGTH",		/* 0x0000005A */ \
	"CALIBRATION_CCM_ONE_GAIN_THRESHOLD",		/* 0x0000005B */ \
	"CALIBRATION_AE_ZONE_WGHT_HOR",			/* 0x0000005C */ \
	"CALIBRATION_AE_ZONE_WGHT_VER",			/* 0x0000005D */ \
	"CALIBRATION_AWB_ZONE_WGHT_HOR",		/* 0x0000005E */ \
	"CALIBRATION_AWB_ZONE_WGHT_VER",		/* 0x0000005F */ \
	"CALIBRATION_FS_MC_OFF",			/* 0x00000060 */ \
	"CALIBRATION_CMOS_EXP_PARTITION",		/* 0x00000061 */ \
	"CALIBRATION_DEFECT_PIXEL",			/* 0x00000062 */ \
	"CALIBRATION_GAMMA_BE0",			/* 0x00000063 */ \
	"CALIBRATION_GAMMA_BE1",			/* 0x00000064 */ \
	"CALIBRATION_DECOMPANDER_CONTROL",		/* 0x00000065 */ \
	"CALIBRATION_INPUT_FORMATTER",			/* 0x00000066 */ \
	"CALIBRATION_NEQ_LUT",				/* 0x00000067 */ \
	"CALIBRATION_SINTER_INTCONFIG",			/* 0x00000068 */ \
	"CALIBRATION_RGB2RGB_HS_CONVERSION",		/* 0x00000069 */ \
	"CALIBRATION_RGB2RGB_HS_CONVERSION_B",		/* 0x0000006A */ \
	"CALIBRATION_RGB2RGB_S2_CONVERSION",		/* 0x0000006B */ \
	"CALIBRATION_RGB2RGB_S2_CONVERSION_B",		/* 0x0000006C */ \
	"CALIBRATION_AE_CONTROL_HDR_TARGET",		/* 0x0000006D */ \
	"CALIBRATION_AE_CONTROL",			/* 0x0000006E */ \
	"CALIBRATION_COLOR_MATRIX_YUV_PRESETS",		/* 0x0000006F */ \
	"CALIBRATION_COLOR_MATRIX_B_YUV_PRESETS",	/* 0x00000070 */ \
	"CALIBRATION_COLOR_MATRIX_LUV_PRESETS",		/* 0x00000071 */ \
	"CALIBRATION_COLOR_MATRIX_B_LUV_PRESETS",	/* 0x00000072 */ \
	"CALIBRATION_IRIDIX_GTM_LUT_X",			/* 0x00000073 */ \
	"CALIBRATION_IRIDIX_GTM_LUT_Y",			/* 0x00000074 */ \
	"CALIBRATION_DEMOSAIC_CONFIG",			/* 0x00000075 */ \
	"CALIBRATION_GAMMA_BLACK_LEVELS",		/* 0x00000076 */ \
	"CALIBRATION_RAW_FRONTEND_CONFIG",		/* 0x00000077 */ \
	"CALIBRATION_NOISE_PROFILE_CONFIG",		/* 0x00000078 */ \
	"CALIBRATION_WDR_STITCH_CONFIG",		/* 0x00000079 */ \
	"CALIBRATION_STATISTICS_CONFIG",		/* 0x0000007A */ \
	"CALIBRATION_CUSTOM_SETTINGS",			/* 0x0000007B */ \
	"CALIBRATION_IRIDIX_BRIGHT_PR",			/* 0x0000007c */ \
	"CALIBRATION_IRIDIX_SVARIANCE",			/* 0x0000007d */ \
	"CALIBRATION_VERSION_INFO",			/* 0x0000007e */ \
	"CALIBRATION_SHADING_TEMPER_THRESHOLD",		/* 0x0000007f */ \
	"CALIBRATION_CCM_TEMPER_THRESHOLD",		/* 0x00000080 */ \
	"CALIBRATION_GAMMA_EV1",			/* 0x00000081 */ \
	"CALIBRATION_GAMMA_EV2",			/* 0x00000082 */ \
	"CALIBRATION_GAMMA_THRESHOLD",			/* 0x00000083 */ \
	"CALIBRATION_IRIDIX_ASYMMETRY_EV1",		/* 0x00000084 */ \
	"CALIBRATION_IRIDIX_ASYMMETRY_EV2",		/* 0x00000085 */ \
	"CALIBRATION_IRIDIX_THRESHOLD",			/* 0x00000086 */ \
	"CALIBRATION_OUTPUT_YUV_Y_LUT",			/* 0x00000087 */ \
	"CALIBRATION_OUTPUT_YUV_UV_LUT",		/* 0x00000088 */ \
	"CALIBRATION_IRIDIX_WHITE_LEVEL",		/* 0x00000089 */ \
	"CALIBRATION_GRASS_REMOVE_PARAM",		/* 0x0000008a */ \
	"CALIBRATION_MAX"				/* MAX */ \
}

#define CALIBRATION_WIDTH_CHECK_LUTS { \
	2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 	/* 0 */ \
	2, 2, 2, 2, 4, 4, 2, 2, 2, 2, 	/* 1 */ \
	2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 	/* 2 */ \
	1, 1, 1, 2, 2, 2, 1, 1, 4, 4, 	/* 3 */ \
	2, 1, 4, 2, 2, 2, 2, 2, 2, 2, 	/* 4 */ \
	4, 2, 4, 2, 2, 2, 2, 1, 2, 2, 	/* 5 */ \
	4, 2, 4, 2, 2, 2, 2, 2, 2, 2, 	/* 6 */ \
	2, 1, 1, 1, 1, 2, 4, 4, 1, 4, 	/* 7 */ \
	2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 	/* 8 */ \
	2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 	/* 9 */ \
	4, 1, 2, 4, 2, 2, 2, 2, 2, 2, 	/* 10 */ \
	4, 2, 2, 2, 2, 4, 4, 2, 4, 2, 	/* 11 */ \
	2, 4, 4, 4, 2, 2, 1, 4, 4, 4, 	/* 12 */ \
	4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 	/* 13 */ \
	4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 	/* 14 */ \
	4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 	/* 15 */ \
	4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 	/* 16 */ \
	4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 	/* 17 */ \
	4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 	/* 18 */ \
	4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 	/* 19 */ \
}

//------------------FILE TRANSFER-------------------
#define LIBISP_CALIBRATION_TOTAL_SIZE	(500U)
#define CALIBRATION_NAME_SIZE	(100)
#define CALIBRATION_MULTI_NUM 4

typedef struct LookupTable {
	void *ptr;
	uint16_t rows;
	uint16_t cols;
	uint16_t width;
} LookupTable;

typedef struct _ACameraCalibrations {
	LookupTable* calibrations[CALIBRATION_MULTI_NUM][LIBISP_CALIBRATION_TOTAL_SIZE];
} ACameraCalibrations;

typedef struct calib_info_s {
	int32_t port;
	// int32_t calib_fd;
	// void *dfd;
	uint32_t total_calib;
	LookupTable plut[CALIBRATION_MULTI_NUM][LIBISP_CALIBRATION_TOTAL_SIZE];
	// calib_module_t *pfunc;
	void *calib_ops;
	// ACameraCalibrations pc;
	char name[CALIBRATION_NAME_SIZE];
	uint32_t tsize[CALIBRATION_MULTI_NUM];
	uint32_t calib_total_size[CALIBRATION_MULTI_NUM];
	int32_t is_legacy;
	int32_t cal_idevfd;
	char *sensor_name;
} calib_info_t;

#ifdef __cplusplus
}
#endif

#endif /* __CAMERA_MOD_CALIB_DATA_H__ */


